home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / falclib2.lzh / ROUTS / CONVPAL1.S < prev    next >
Text File  |  1994-02-12  |  410b  |  27 lines

  1. *
  2. * CONVPAL1.S
  3. *
  4. *    @convert_stpal
  5. *
  6. *    Convert an old st colour value to a new falcon one
  7. *
  8. * In    d0.w=old st colour
  9. * Out    d0.l=falcon colour
  10. *    (destroys d1-d3)
  11. *
  12.  
  13. @convert_stpal
  14.     move    d0,d1
  15.     move    d1,d2
  16.     and.l    #$0007,d0
  17.     lsl.l    #5,d0        Blue ready
  18.     and.l    #$0070,d1
  19.     move    #17,d3
  20.     lsl.l    d3,d1
  21.     or.l    d1,d0        Green ready
  22.     and.l    #$0700,d2
  23.     move    #21,d1
  24.     lsl.l    d1,d2
  25.     or.l    d2,d0        Green ready
  26.     rts
  27.